<html>
<head>
<title>{$title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="Resource/Css/Main.css" rel="stylesheet" type="text/css" />
<link href="Resource/Css/page.css" rel="stylesheet" type="text/css" />
<link href="Resource/Css/Thickbox.css" rel="stylesheet" type="text/css" />
<link href="Resource/Css/ClientAuto.css" rel="stylesheet" type="text/css" />
{webcontrol type='LoadJsCss' src="Resource/Script/Calendar/WdatePicker.js"}
<script language="javascript" src="Resource/Script/ajax.js"></script>
<script language="javascript" src="Resource/Script/Common.js"></script>
<!-- <script language="javascript" src="Resource/Script/jquery.js"></script> -->
<script language="javascript" src="Resource/Script/jquery.1.9.1.js"></script>
<script language="javascript" src="Resource/Script/jquery-migrate-1.2.1.js"></script>
<script language="javascript" src="Resource/Script/TmisMenu.js"></script>
<link rel="stylesheet" type="text/css" href="Resource/Script/autocomplete/autocomplete.css" />
<script language="javascript" src="Resource/Script/autocomplete/autocomplete.js"></script>
<script language="javascript" src="Resource/Script/thickbox/thickbox.js"></script>
<!-- <script language="javascript" src="Resource/Css/Thickbox.css"></script> -->
{$other_script}
<script language="javascript">
{literal}
$(function(){
	$('#clientText').autocomplete('?controller=Jichu_Client&action=GetJsonByKey', {
			minChars:1,
			remoteDataType:'json',
			useCache:false,
			sortResults:false,
			onItemSelect:function(v){
				$('#clientIdTmp').val(v.data[0].id);
        		$('#divModel').hide();
        		$('#btnMore').removeClass('active');
			}
	});
	//切换divModel的可见
	$('#btnMore').click(function(){
		$('#clientText').val('');
		if($('#divModel').is(':hidden')){
			var showTarget = $(this), target= $('#clientIdTmp');
			var showL = target.offset().left
			   ,showT = target.offset().top
			   ,showW = target.width()
			   ,showH = target.height();
		    $('#clientText').css("left", showL).css("top", showT).css("width",showW).css("height", showH+1);
			$('#divModel').css({'left':showL,'top':showT, 'width':(showW+2), 'height':(showH+2)}).show();
		    $(this).addClass('active');
			$('#clientIdTmp').val('');
			$('#clientText').focus();
		} else {
			$('#divModel').hide();
			$(this).removeClass('active');
		}
	});
});
function popMenu(e) {
	tMenu(e,'Index.php?controller=Jichu_Ware&action=tmismenu',0,false,function(e) {
		var arr = explode("||",e.text);
		$('#spanWareName')[0].innerHTML = arr[0]?arr[0]:'&nbsp;';
		$('#spanGuige')[0].innerHTML = arr[1]?arr[1]:'&nbsp;';
		$('#spanDanwei')[0].innerHTML = arr[2]?arr[2]:'kg';
	});
}

function popYlMenu(e) {
	tMenu(e,'Index.php?controller=Jichu_Ware&action=tmismenu',5,false,function(e) {
		var arr = explode("||",e.text);
		$('#spanWareName')[0].innerHTML = arr[0]?arr[0]:'&nbsp;';
		$('#spanGuige')[0].innerHTML = arr[1]?arr[1]:'&nbsp;';
		$('#spanDanwei')[0].innerHTML = arr[2]?arr[2]:'kg';
	});
}
{/literal}
</script>
{if $sonTpl}{include file=$sonTpl}{/if}
</head>
<body style="margin-left:8px; margin-right:8px;">
<div id='divPanel' style="margin:0px; padding:0px;">
	{if $nav_display != 'none'}{include file="_ContentNav.tpl"}{/if}
	
	{include file="_SearchItem.tpl"}

	{include file="_TableForBrowse.tpl"}
	{$page_info}
</div>
<div id="divModel" class="s-isindex-wrap s-model-set-menu menu-top" style="display:none;">
	<div><input type="text" class="clientText" id="clientText"/></div>
</div>
</body>
</html>
